From 1fe5e617d41f9ba05f7d53f6f34e433bf41e0d43 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 17 Aug 2018 16:12:19 +0100 Subject: [PATCH] xen: fix building !CONFIG_LOCK_PROFILE The init function shouldn't be built or called at all when !CONFIG_LOCK_PROFILE. Signed-off-by: Wei Liu Acked-by: Andrew Cooper --- xen/common/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 8f2ba0818c..36e31c91ff 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -471,6 +471,7 @@ void _lock_profile_deregister_struct( spin_unlock(&lock_profile_lock); } +#ifdef CONFIG_LOCK_PROFILE static int __init lock_prof_init(void) { struct lock_profile **q; @@ -489,5 +490,6 @@ static int __init lock_prof_init(void) return 0; } __initcall(lock_prof_init); +#endif #endif /* LOCK_PROFILE */ -- 2.30.2